# -*- coding: iso-8859-1 -*-
#
#    This is part of Malvinas Argentinas Messenger
#
#    Malvinas Argentinas Messenger is free software; you can redistribute
#    it and/or modify it under the terms of the GNU General Public License
#    as published by the Free Software Foundation; either version 2 of the
#    License, or (at your option) any later version.
#
#    Malvinas Argentinas Messenger is distributed in the hope that it will be
#    useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with Malvinas Argentinas Messenger; if not, write to the Free
#    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
#    MA  02110-1301  USA
import time

class logo:
	def __init__(self, ui):
		self.ui = ui
		self.py = (self.ui.maxY - self.ui.filasInput - 6 - self.ui.filasEventos - 16)/2	# For centering logo
		self.px = (self.ui.maxX - 60)/2

	def completarY(self):
		for i in range(self.py):
			self.ui.padArray.wins[0].ventana.addstr ('\n')
		pass
	
	def completarX(self):
		res = ''
		for i in range(self.px):
			res += " "
		return res

	def printL(self, linea, color):
		self.ui.padArray.wins[0].ventana.addstr(linea, color)
		self.ui.padArray.wins[0].ventana.refresh()
		time.sleep(.05)

	def printLogo(self):
		# Show the logo
		self.completarY()
		#self.printL(self.completarX() + "MMMMMMMMMMMMMMMMMMMMM877ZMMMMMMMMMMMMM78MMMN77$MMMMMMMMMMMMM\n", self.ui.COLORS.BLUE_R
		self.printL(self.completarX() + "MMMMMMMMMMMMMMMMMMMMMMMMMMN7DMMMMMMMMMM777777777DO777777DMMM\n", self.ui.COLORS.BLUE_R)
		self.printL(self.completarX() + "MMMMMMMM77$MMMMMMDM7MMMMMM7777$MMMMNMN7777777MMMM7777777$MMM\n", self.ui.COLORS.BLUE_R)
		self.printL(self.completarX() + "MMMMMMMMMMMO$MMMMM777777777777MMMMMMN7777777777MMMN7MMMMMMMM\n", self.ui.COLORS.BLUE_R)
		self.printL(self.completarX() + "MMMMMMMMMMD777777777777777777MMMMMM7M777777777777777777777$M\n", self.ui.COLORS.BLUE_R)
		self.printL(self.completarX() + "MMMMMMMMMMMMMM777777777777$$MMMMMMMM777777777777777777777MNM\n", self.ui.COLORS.BLUE_R)
		self.printL(self.completarX() + "MMMMMM,MMMMMMMMM.........MMMMMMMMMMMM...................MMMM\n", self.ui.COLORS.WHITE_R)
		self.printL(self.completarX() + "MMMMMMM. ..DMMM         MMMMMMMMMMM .M             DDMMMMMMM\n", self.ui.COLORS.WHITE_R)
		self.printL(self.completarX() + "MMMMMMMM MMDN.        MMMMMMMMMMM    MN.           .MMMMMMMM\n", self.ui.COLORS.WHITE_R)
		self.printL(self.completarX() + "MMMMMMMMMM M.        MMMMMMMMM 8       MMM.:$NMM MMMMMMMMMMM\n", self.ui.COLORS.WHITE_R)
		self.printL(self.completarX() + "MMMMMMMMM,Z         ZMMMMMMMM,.         ..MDMMMMMMMMMMMMMMMM\n", self.ui.COLORS.WHITE_R)
		self.printL(self.completarX() + "MMMZ7DDNNMMMMMMMMMNMMMMMMMMMM,.,,,,..,,,,,,,.MMMMMMMMMMMMMMM\n", self.ui.COLORS.WHITE_R)
		self.printL(self.completarX() + "DM$N777777777MMMMMMMMMMMMMMN7777777MMMM$7MMM7MMMMMMMMMMMMMMM\n", self.ui.COLORS.BLUE_R)
		self.printL(self.completarX() + "M77D77777777$MMMMMMMMMMMMMMMD7777777$MMMMMMMMMMMMMMMMMMMMMMM\n", self.ui.COLORS.BLUE_R)
		self.printL(self.completarX() + "MMM7M7777DNNMMMMMMMMMMMMMMM$777MMMO77ZMMMMMMMMMMMMMMMMMMMMMM\n", self.ui.COLORS.BLUE_R)
		self.printL(self.completarX() + "MMMMMM7ZMMMMMMMMMMMMMMMMMMMM777$ZMMMMMMMMMMMMMMMMMMMMMMMMMMM\n", self.ui.COLORS.BLUE_R)
		#self.printL(self.completarX() + "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM878MMMMMMMMMMMMMMMMMMMMMMMMMMM\n", self.ui.COLORS.BLUR_R)
		self.printL(self.completarX() + "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", self.ui.COLORS.BLUE_R)

